{{ template "header" . }}

{{ $repo := .RepoName }}

<h1>{{ .RepoName }}</h1>

<nav class="navbar navbar-expand navbar-light bg-light">
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" href="/{{ $repo }}">About</a>
      </li>
      <li class="nav-item active">
        <a class="nav-link" href="/{{ $repo }}/refs">Refs</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="/{{ $repo }}/log">Log</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="/{{ $repo }}/tree">Tree</a>
      </li>
    </ul>
  </div>
</nav>

<h3>Branches</h3>

<table class="table">
    {{ range .Branches }}
      <tr>
          <td>{{ .Name.Short }}</td>
          <td><a href="/{{ $repo }}/log/{{ .Name.Short }}">log</a></td>
          <td><a href="/{{ $repo }}/tree/{{ .Name.Short }}">tree</a></td>
      </tr>
    {{ end }}
</table>

<h3>Tags</h3>

<table class="table">
    {{ range .Tags }}
    <tr>
        <td>{{ .Name.Short }}</td>
        <td><a href="/{{ $repo }}/log/{{ .Name.Short }}">log</a></td>
        <td><a href="/{{ $repo }}/tree/{{ .Name.Short }}">tree</a></td>
    </tr>
    {{ end }}
</table>

{{ template "footer" }}
